<template>
    <span class="span2">我是页面2</span>
</template>

<!-- js或ts -->
<script lang="ts">
export default {
    name: 'routeTest1Page2'
}
</script>

<!-- js或ts -->
<script setup lang="ts">
import { onMounted, onUnmounted } from 'vue'
//方法
onMounted(() => {
    console.log('页面2挂载后')
})
onUnmounted(() => {
    console.log('页面2卸载后')
})
</script>

<!-- 样式 -->
<style scoped></style>